<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>{{v('config.webname')}}</title>
    <script>
        //模块配置项
        var hdjs = {
            //框架目录
            'base': '{{__ROOT__}}/node_modules/hdjs',
            //上传文件后台地址
            'uploader': "{{u('component.upload.uploader')}}",
            //获取文件列表的后台地址
            'filesLists': "{{u('component.upload.filesLists')}}"
        };
    </script>
    <link rel="stylesheet" href="resource/org/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="resource/css/normalize.css"/>
    <link rel="stylesheet" type="text/css" href="resource/css/demo.css">
    <link rel="stylesheet" href="resource/css/style.css">
    <script src="{{__ROOT__}}/node_modules/hdjs/app/util.js"></script>
    <script src="{{__ROOT__}}/node_modules/hdjs/require.js"></script>
    <script src="{{__ROOT__}}/node_modules/hdjs/config.js"></script>
    <link href="{{__ROOT__}}/resource/css/hdcms.css" rel="stylesheet">
    <script>
        if (navigator.appName == 'Microsoft Internet Explorer') {
            if (navigator.userAgent.indexOf("MSIE 5.0") > 0 || navigator.userAgent.indexOf("MSIE 6.0") > 0 || navigator.userAgent.indexOf("MSIE 7.0") > 0) {
                alert('您使用的 IE 浏览器版本过低, 推荐使用 Chrome 浏览器或 IE8 及以上版本浏览器.');
            }
        }
    </script>
    <style>
        .row {
            width: 30%;
            position: absolute;
            top: 25%;
            right: 10%;
        }

        textarea {
            resize: none;
        }
    </style>
</head>
<body ng-app="hd" ng-controller="ctrl">
<canvas id="c1"></canvas>
<canvas id="c2"></canvas>

<script src="resource/js/index.js"></script>
<div class="container">
    <div class="row">
        <div class="panel panel-default">
            <div class="panel-body">
                <form method="post" action=""  onsubmit="return post(event)">
                    <div class="form-group">
                        <label>用户名</label>
                        <input type="text" class="form-control" placeholder="请输入用户名" name="admin_username">
                    </div>
                    <div class="form-group">
                        <label>密码</label>
                        <input type="password" class="form-control" placeholder="请输入密码" name="admin_password">
                    </div>
                    <div class="form-group">
                        <label>验证码 </label>
                        <img src="{{u('admin.login.code')}}" onclick="this.src=this.src+'&rand='+Math.random()" alt="">

                        <div class="input-group">
                            <div class="input-group-addon"><i class="fa fa-w fa-key"></i></div>
                            <input type="text" name="code"
                                   class="form-control input-lg" placeholder="请输入验证码">
                        </div>

                    </div>
                    <button type="submit" class="btn btn-primary btn-lg">登录</button>
                    <!--协议内容结束-->
                </form>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    require(['jquery']);
</script>
<script>
    function post(event) {
        //阻止表单默认行为
        event.preventDefault();
        require(['util'], function (util) {
            util.submit({
                successUrl:"{{u('admin.entry.index')}}"
            });
        });
    }
</script>
</html>